Declare Function UnrealizeObject Lib "GDI" (ByVal hObject As Integer) As Integer
Declare Function SelectObject Lib "GDI" (ByVal hDC As Integer, ByVal hObject As Integer) As Integer
Declare Function GetStockObject Lib "GDI" (ByVal nIndex As Integer) As Integer
Declare Function Rectangle Lib "GDI" (ByVal hDC As Integer, ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer
Declare Function SetROP2 Lib "GDI" (ByVal hDC As Integer, ByVal nDrawMode As Integer) As Integer
Declare Function CreateRectRgn Lib "GDI" (ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer
Declare Function SelectClipRgn Lib "GDI" (ByVal hDC As Integer, ByVal hRgn As Integer) As Integer
Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer
Declare Function GetDC Lib "User" (ByVal hWnd As Integer) As Integer
Declare Function ReleaseDC Lib "User" (ByVal hWnd As Integer, ByVal hDC As Integer) As Integer
Declare Function DeleteDC Lib "GDI" (ByVal hDC As Integer) As Integer
Declare Function RestoreDC Lib "GDI" (ByVal hDC As Integer, ByVal nSavedDC As Integer) As Integer
' Binary raster ops
Global Const R2_NOTXORPEN = 10
' Stock Logical Objects
Global Const WHITE_BRUSH = 0
Global Const LTGRAY_BRUSH = 1
Global Const GRAY_BRUSH = 2
Global Const DKGRAY_BRUSH = 3
Global Const BLACK_BRUSH = 4
Global Const NULL_BRUSH = 5
Global Const HOLLOW_BRUSH = NULL_BRUSH
Declare Function GetModuleHandle Lib "Kernel" (ByVal lpModuleName As String)
Declare Function GetModuleUsage Lib "Kernel" (ByVal hModule As Integer)
Declare Function GetWindowsDirectory% Lib "Kernel" (ByVal lpBuffer$, ByVal nSize%)
Declare Function GetSystemDirectory% Lib "Kernel" (ByVal lpBuffer$, ByVal nSize%)
' Calculator declarations
Global StartX As Single
Global StartY As Single
Global Border As Single
Global TPRatio As Single
Global Bevel As Integer
Global Outline As Integer
Global OKToMove As Integer
Global PixOffsetX As Integer
Global PixOffsetY As Integer
Global PixStartX As Integer
Global PixStartY As Integer
Global PixPictX As Integer
Global PixPictY As Integer
Global PixX As Integer
Global PixY As Integer
Global RgnX1 As Integer
Global RgnY1 As Integer
Global RgnX2 As Integer
Global RgnY2 As Integer
' Data type used by FillRect
Type RECT
left As Integer
top As Integer
right As Integer
bottom As Integer
End Type
' API Functions used to create pattern brush and draw brush on form
Declare Function CreatePatternBrush Lib "GDI" (ByVal hBitmap As Integer) As Integer
Declare Function FillRect Lib "User" (ByVal hDC As Integer, lpRect As RECT, ByVal hBrush As Integer) As Integer
Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer
' This variable keeps track of which picture shade in picShade